package com.crs.mapper;

import com.crs.dto.AdminAcceptOrRejectDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AdminMapper {

    /**
     * 管理员同意或拒绝申请
     * @param adminAcceptOrRejectDTO
     */
    @Update("update borrow_record set status = #{status},admin_comment = #{adminComment}" +
            ",borrow_time = now(),admin_id = #{adminId} where id = #{borrowId}")
    void acceptOrReject(AdminAcceptOrRejectDTO adminAcceptOrRejectDTO);
}
